package com.zf.yichat.service;

import com.zf.yichat.model.UserBank;
import com.zf.yichat.model.UserBankXs;
import com.zf.yichat.utils.response.FsResponse;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Map;

/**
 * 新生支付
 */
public interface XsPayService {
    FsResponse xspayGetAccount();

    Map<String, String> weixinPrePay(Long userId, Integer tradeType, BigDecimal money);

    String payNotify(String rexXml);

    String alipayPre(Long userId, Integer tradeType, BigDecimal money);

//    String alipayNotufy(HttpServletRequest res) throws UnsupportedEncodingException;

//    FsResponse unionpayPre(String orderCode, Long userId, Integer tradeType, BigDecimal money);

//    FsResponse xspayOpenAccount(Long userId, Integer bankId);

    FsResponse xspayBindCardPre(Long userId, UserBankXs bank);

    FsResponse xspayBindCardConfirm(String orderCode, String ncountOrderId, String smsCode);

    FsResponse xspayPre(String orderCode, Long userId, Integer tradeType, BigDecimal money, Integer bankId);

    FsResponse xspayConfirm(String orderCode, String ncountOrderId, String smsCode);

    FsResponse xspayWithDraw(Long userId, String bankNumber, BigDecimal money);

//    FsResponse unionpayPre2(String orderCode, Integer userId, Integer tradeType, BigDecimal money);
//
//    FsResponse unionpayOpenStatus(String orderCode, String accNo);
//
//    FsResponse unionpaySms(String orderCode, String phoneNo, String accNo);
//
//    FsResponse unionpayConsume(String orderCode, String accNo, String smsCode);
//
//    void unionpayNotify(HttpServletRequest res, HttpServletResponse resp) throws IOException;

    void xspayNotify(HttpServletRequest res, HttpServletResponse resp) throws IOException;

//    boolean unionpayValidateAppResponse(String jsonData, String encoding);

    FsResponse transferAlipayAccount(String appOrderNO, String account, BigDecimal money);
}
